/**
 * DataSourceManagerImpl.java
 * Jan 9, 2010
 */
package com.dlplay.flightinfo.source;

import java.util.ArrayList;
import java.util.List;


/**
 * @author zhao yu
 *
 */
public class DataSourceManager {	
	private List<RealTimeFlightDS> rtFlightDS = new ArrayList<RealTimeFlightDS>();	
	private List<AirportDataSource> airportDataSources = new ArrayList<AirportDataSource>();
	private List<AirlineDataSource> airlineDataSources = new ArrayList<AirlineDataSource>();
	private List<AgencyDataSource> agencyDataSources = new ArrayList<AgencyDataSource>();
	private List<TicketDataSource> ticketDataSource = new ArrayList<TicketDataSource>();
	
	
	public void Init()
	{
		//Add for debugging
//		airportDataSources.add(new DumpDataSource());
//		rtFlightDS.add(new DumpDataSource());
		airportDataSources.add(new FeeyoDataSource());
		rtFlightDS.add(new FeeyoDataSource());
		
		//Priority 9
//		FeeyoDataSource feeyoDs = new FeeyoDataSource(); 
//		feeyoDs.setPriority(FeeyoDataSource.DEFAULT_DATASOURCE_PRI);
//		rtFlightDS.add(feeyoDs);
//		airportDataSources.add(feeyoDs);
//		
//		//Priority 8
//		CMCCDataSource cmccDs = new CMCCDataSource(); 
//		cmccDs.setPriority(CMCCDataSource.DEFAULT_DATASOURCE_PRI);
//		rtFlightDS.add(cmccDs);
//		airportDataSources.add(cmccDs);
//		
//		//Priority 7
//		JpRssrcDataSource JpRssrcDs = new JpRssrcDataSource(); 
//		JpRssrcDs.setPriority(JpRssrcDataSource.DEFAULT_DATASOURCE_PRI);
//		rtFlightDS.add(JpRssrcDs);
//		airportDataSources.add(JpRssrcDs);
		
		//TODO we need to reSort this list according to priority
	}


	/**
	 * @return the flightDataSources
	 */
	public List<RealTimeFlightDS> getRealTimeFlightDS() {
		return rtFlightDS;
	}


	/**
	 * @return the airportDataSources
	 */
	public List<AirportDataSource> getAirportDataSources() {
		return airportDataSources;
	}


	/**
	 * @return the airlineDataSources
	 */
	public List<AirlineDataSource> getAirlineDataSources() {
		return airlineDataSources;
	}


	/**
	 * @return the agencyDataSources
	 */
	public List<AgencyDataSource> getAgencyDataSources() {
		return agencyDataSources;
	}


	/**
	 * @return the ticketDataSource
	 */
	public List<TicketDataSource> getTicketDataSource() {
		return ticketDataSource;
	}

}
